package com.itheima.stock.mapper;

import com.itheima.stock.pojo.StockBusiness;
import com.itheima.stock.vo.resp.BusinessRespVo;

import java.util.List;

/**
 * @author 呱呱
 * @description 针对表【stock_business(主营业务表)】的数据库操作Mapper
 * @createDate 2022-05-30 15:45:59
 * @Entity com.itheima.stock.pojo.StockBusiness
 */
public interface StockBusinessMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockBusiness record);

    int insertSelective(StockBusiness record);

    StockBusiness selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockBusiness record);

    int updateByPrimaryKey(StockBusiness record);

    /**
     * @return 查询所有主营业务表
     */
    List<StockBusiness> getAll();

    /**
     * 查询所有A股股票编码集合
     *
     * @return {@link List}<{@link String}>
     */
    List<String> getAllStockCodes();
    /**
     * 根据股票编码查询个股主营业务
     *
     * @param code 代码
     * @return {@link }<{@link BusinessRespVo}>
     */
    BusinessRespVo getStockAccountByCode(String code);
}
